// 基础重置
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

// 统一字体和基础样式
html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
  color: #333;
  background-color: #fff;
}

// 重置列表元素
ul, ol {
  list-style: none;
}

// 重置链接样式
a {
  color: #165DFF;
  text-decoration: none;
  background-color: transparent;
  
  &:hover {
    color: #0E42D2;
    text-decoration: underline;
  }
}

// 重置表格样式
table {
  border-collapse: collapse;
  border-spacing: 0;
}

// 重置表单元素
input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 12px;
  
  &:focus {
    outline: none;
    border-color: #165DFF;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.2);
  }
}

button {
  cursor: pointer;
  border: none;
  background-color: transparent;
  padding: 6px 12px;
  
  &:disabled {
    cursor: not-allowed;
    opacity: 0.65;
  }
}

// 重置图片和媒体元素
img, video, audio {
  display: block;
  max-width: 100%;
  height: auto;
}

// 重置块级元素
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
dl, dd, dt, figure {
  margin: 0;
  padding: 0;
}

// 重置语义化标签
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
  display: block;
}

// 清除浮动
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

// 隐藏元素但保持可访问性
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
